package cn.hwua.entity;

public class JSONBean {
    private static final int SUCCESS=0;
    private static final int FAIL=1;
    private int state;
    private String msg;
    private Object data;

    public void setSuccess(String msg){
        this.state=SUCCESS;
        this.msg=msg;
    }
    public void setFail(String msg){
        this.state=FAIL;
        this.msg=msg;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "JSONBean{" +
                "state=" + state +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }
}
